<%-- 
    Document   : customDemo
    Created on : Aug 18, 2011, 8:47:30 PM
    Author     : s4201567 Tony Yu
--%>

<style type="text/css">
    .error { color:red; }
    
    #master-title {
        text-align:center;
    }
    
    #pa-list {
        padding-left:240px;
        width:auto;
        
    }
    #button{
       padding-top: 20px;  
        padding-bottom: 20px;   
    }
    #buttonback{
       padding-bottom: 20px;        
    }
</style>

<%@ include file="../header.jsp" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
    <body>
        <div id="content-container1">
            <div id="content">
                <% if (request.getParameter("tempID") != null) { %>
                <div id="master-title">
                  <h3>Add Custom Demographics</h3>
                </div>
                <%
                    Object tempID = request.getParameter("tempID");
                %>
                <div id="pa-list">
                  <form:form method="post" commandName="customDemo">
                  
                  <form:input path='templateID' hidden="true" type='text' value='<%=tempID%>'/>
                  <table bgcolor="f8f8ff" border="0" cellspacing="0" cellpadding="5">
                    <tr>
                      <td>Demographic:</td>
                        <td>
                            <form:input path="demographic"/>
                        </td>
                        <td>
                            <form:errors path="demographic" cssClass="error"/>
                        </td>
                    </tr>
                  </table>
                  <div id="button"> 
                      <input type="submit" align="center" value="Add Demographic">
                      <input type="reset" value="Reset" name="reset">
                  </div>
                  <div id="buttonback">                      
                        <input type="button" value="Back" onClick="javascript: history.go(-1)">
                  </div>
                </form:form>
                
              </div>
            <% } else
                out.println("<p>The page was improperally formed, try going back and trying again.</p>");
            %>
        </div>	
    </body>
<%@ include file="../footer.jsp" %>
